#ifndef MTBINARYOPERATOR_H
#define MTBINARYOPERATOR_H

#include "MTExpression.hpp"

namespace MathematicaTranslator {
	
	/** 
	  *  Class that represents operation in mathematics calculations.
	  *  It creates its own calculus tree to keep operators precedence for proper evaluation
	  */
	class MTBinaryOperator : public MTExpression {
		
	public:
		std::string op;
		MTExpression& expr1;
		MTExpression& expr2;
		CodeGenContext* myContext;

		MTBinaryOperator(MTExpression& expr1, const std::string& op, MTExpression& expr2)
			: expr1(expr1), expr2(expr2), op(op) {} 

		virtual std::string* generateCode(CodeGenContext& context);
		virtual std::string* getType();
		virtual int getClassType();
	};

}
#endif
